import Error from './Error.vue';
import Loading from './Loading.vue';

const factory = (path, delay = 20, timeout = 2000) => () => {
    return {
        component: import(`@/${path}`),
        loading: Loading,
        error: Error,
        delay,
        timeout
    }
};

export default factory;